<?php

class Application_Model_Pages
{
	protected $dbTable;
	
	public function __construct()
	{
		$this->dbTable = new Application_Model_DbTable_Pages();
	}
	
	public function getTable()
	{
		return $this->dbTable;
	}
	
	public function getPage($helper, $url)
	{
		$helper->setTable($this->dbTable);
		
		try
		{
			$page = $helper->getItem($url, 'url');
		}
		catch(Exception $e)
    	{
    		throw new Zend_Controller_Exception($e->getMessage());
		}
		
		return $page;
	}
}